package com.heima.behavior.controller.v1;

import com.heima.behavior.service.CollectionBehaviorService;
import com.heima.model.behavior.dtos.CollectionBehaviorDTO;
import com.heima.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author huan
 * @serial 每天一百行, 致敬未来的自己
 * @Description
 */
@RestController
@RequestMapping("/api/v1")
@Api(value = "用户收藏行为")
public class CollectionBehaviorController {

    @Autowired
    CollectionBehaviorService collectionBehaviorService;

    @PostMapping("/collection_behavior")
    @ApiOperation("用户收藏行为操作")
    public ResponseResult collectBehavior(@RequestBody CollectionBehaviorDTO dto) {
        return collectionBehaviorService.collectBehavior(dto);
    }
}
